package com.ll.blog.contant;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;

public enum ExceptionEnum {
    ARTICLE_NOT_FOUND(10001,"文章未找到" ),
    SAVE_ERROR(10002,"添加失败" ),
    SYSTEM_ERROR(10003,"系统错误" ),
    PARAMS_ERROR(10003,"参数错误" ),
    UPDATE_ERROR(10004,"更新失败" ),
    DELETE_ERROR(10005,"删除失败" ), 
    TYPEERROR(10006,"不参在此类型记录" ),
        TOKEN_ERROR(20000,"请登录"),
    EMAIL_EXIST(10007,"该邮箱已经注册" ),
    CODE_ERROR(10008,"邮箱验证码错误" ),
    USER_NO_EXIST(10009,"用户不存在" ),
    PASSWORD_ERROR(10010,"密码错误" ),
    PERMISSION_DENIED(10011,"权限不足" ),
    NOT_FOUND(10012,"接口不存在" ),
    MAKE_ERROR(10013,"接口调用违法" ),
    CONTENT_VIOLATION(10014,"输入内容违法" );
    int code;
     String msg;
    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    ExceptionEnum(int code,String msg) {
        this.msg = msg;
        this.code = code;
    }
}
